package appapi.Vo;

import appapi.entity.Zhongjiao.SelfcheckDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 请求对象
 *
 * @author luocheng
 * @version 1.0
 * @date 2023/05/31 09:17
 */
@ApiModel
@Data
public class EditSelfcheckRecVo {
    /**
     * 记录ID
     */
    @ApiModelProperty(value = "记录ID")
    private Long selfId;
    /**
     * 创建人名称
     */
    @ApiModelProperty(value = "创建人名称")
    private String createUser;
    /**
     * 设备id
     */
    @ApiModelProperty(value = "设备id")
    private Long equipId;

    /**
     * 设备编号
     */
    @ApiModelProperty(value = "设备编号")
    private String equipNo;


    /**
     * 整改要求
     */
    @ApiModelProperty(value = "整改要求")
    private String expRequire;

    /**
     * 0-通过;1-未通过
     */
    @ApiModelProperty(value = "0-通过;1-未通过")
    private Integer slefResult;

    /**
     * 巡检人员
     */
    @ApiModelProperty(value = "操作人员")
    private Long operId;

    /**
     * 0-已处理;1-未处理
     */
    @ApiModelProperty(value = "0-已处理;1-未处理")
    private Integer selfState;

    @ApiModelProperty(value = "自检时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime selfDate;

    @ApiModelProperty(value = "自检详情")
    private List<EditSelfcheckDetailVo> detail;

    /**
     * 附件地址List
     */
    @ApiModelProperty(value = "附件地址List")
    private List<String> annexUrl;

    public SelfcheckDto vo2Entity(){
        SelfcheckDto entity = new SelfcheckDto();
        BeanUtils.copyProperties(this,entity);
        return entity;
    }
}
